package myky.com.doctorapp.model



import com.xiangyao.train.utils.RxScedulerHelper
import io.reactivex.Observable
import myky.com.doctorapp.api.ApiManager


import myky.com.doctorapp.base.BaseEntity
import myky.com.doctorapp.contract.FollowHtmlActivityContract
import myky.com.doctorapp.entity.FollowUploadEntity
import myky.com.doctorapp.utils.Constants
import myky.com.doctorapp.utils.RequestBodyBuilder
import okhttp3.MediaType
import okhttp3.RequestBody

/**
 * Description:
 *
 * @author wuyangwuyang
 * Created by 2019/3/20 on 16:22
 */
class FollowHtmlActivityModel : FollowHtmlActivityContract.Model {
    override fun uploadFollowHtml(data:String): Observable<BaseEntity<FollowUploadEntity.DataBean>> {
        val body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), data)
        return ApiManager.getApistore().uploadFollowHtml(body).compose(RxScedulerHelper.io_main())
    }
}
